<?php


namespace App\Request\client;


use App\Request\CommonRequest;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;

class UserDeviceRequest extends CommonRequest
{
    protected $name = '设备验证';

    protected $rule = [
        'appLogin' => [
            'unionId' => 'required|max:255',
        ],
        'appPop' => [
            'token' => 'required|max:255',
        ],
        'sendDevicePop' => [
            'token' => 'required|max:255',
        ],
    ];

    protected $message = [
        'unionId.required' => '设备unionId不能为空',
        'token.required' => '设备token不能为空',
    ];

    /**
     * 验证
     * @param array $params
     * @param string $scenes
     * @return bool
     * @throws ContainerExceptionInterface
     * @throws NotFoundExceptionInterface
     */
    public function validated(array $params, string $scenes): bool
    {
        return $this->__validated($params, $scenes);
    }
}